<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>border 测试</title>
    <style>
        * {
            box-sizing: border-box;
        }
        .por {
            position: relative;
        }
        .wrapper {
            display: flex;
        }
        .item {
            margin-right: 20px;
        }
        /* 基础 border 50% */
        .test {
            width: 100px;
            height: 100px;
            border: 1px solid red;
            border-radius: 50px;
            /* border-top-left-radius:     50px 50px;
            border-top-right-radius:    50px 50px;
            border-bottom-right-radius: 50px 50px;
            border-bottom-left-radius:  50px 50px; */
        }
        .test .inner1 {
            position: absolute;
            top: -1px;
            left: -1px;
            width: 100px;
            height: 100px;
            background-color: #5DA998;
            opacity: 50%;
            border-radius: 50%;
        }
        .test .inner2 {
            position: absolute;
            top: -1px;
            right: -1px;
            width: 100px;
            height: 100px;
            background-color: #7D6ECB;
            opacity: 50%;
            border-radius: 50%;
        }
        /* 25/50 50/50 */
        .test1 {
            border-top-left-radius:     25px 50px;
            border-top-right-radius:    50px 50px;
        }
        .test1 .inner1 {
            width: 50px;
        }
        /* 50/25 50/50 */
        .test2 {
            border-top-left-radius:     50px 25px;
            border-top-right-radius:    50px 50px;
        }
        .test2 .inner1 {
            height: 50px;
        }
        /* 25/25 25/50 */
        .test3 {
            border-top-left-radius:     25px 25px;
            border-top-right-radius:    25px 50px;
        }
        .test3 .inner1 {
            width: 50px;
            height: 50px;
        }
        .test3 .inner2 {
            width: 50px;
        }
        /* 75/50 25/50  
         75+25 = 100 所以不缩小 */
        .test4 {
            margin-right: 80px;
            border-top-left-radius:     75px 50px;
            border-top-right-radius:    25px 50px;
        }
        .test4 .inner1 {
            width: 150px;
        }
        .test4 .inner2 {
            width: 50px;
        }
        /*  75/50 50/50
          75+50 > 100 所有的 border-radius 等比例缩小
          75*(100/(75+50)) = 60; 
          50*(100/(75+50)) = 40; */
        .test5 {
            margin-right: 40px;
            border-top-left-radius:     75px 50px;
            border-top-right-radius:    50px 50px;
        }
        .test5 .inner1 {
            width: 120px;
            height: 80px;
        }
        .test5 .inner2 {
            width: 80px;
            height: 80px;
        }
        /*  75/0 50/50 
            top-left 垂直圆角为0，不存在短轴半径为0的圆，因此该处无圆角。其他各处计算方法不变 */
        .test6 {
            margin-right: 40px;
            border-top-left-radius:     75px 0;
            border-top-right-radius:    50px 50px;
        }
        .test6 .inner1 {
            width: 120px;
            height: 0;
        }
        .test6 .inner2 {
            width: 80px;
            height: 80px;
        }
    </style>
</head>
<body>
    <div class="wrapper">
        <div class="item">
            <div class="test por">
                <div class="inner1"></div>
                <div class="inner2"></div>
            </div>
        </div>
        <div class="item">
            <div class="test test1 por">
                <div class="inner1"></div>
                <div class="inner2"></div>
            </div>
        </div>
        <div class="item">
            <div class="test test2 por">
                <div class="inner1"></div>
                <div class="inner2"></div>
            </div>
        </div>
        <div class="item">
            <div class="test test3 por">
                <div class="inner1"></div>
                <div class="inner2"></div>
            </div>
        </div>
        <div class="item">
            <div class="test test4 por">
                <div class="inner1"></div>
                <div class="inner2"></div>
            </div>
        </div>
        <div class="item">
            <div class="test test5 por">
                <div class="inner1"></div>
                <div class="inner2"></div>
            </div>
        </div>
        <div class="item">
            <div class="test test6 por">
                <div class="inner1"></div>
                <div class="inner2"></div>
            </div>
        </div>
    </div>
</body>
</html>